#pragma once

class ShaderUI : public Singleton<ShaderUI>
{
	Dialog* m_dialog;
	Scrollbar<ShaderUI>* m_pRed, *m_pGreen, *m_pBlue;
	DialogText* m_pTRed, *m_pTGreen, *m_pTBlue;
	Checkbox<ShaderUI>* m_pShader;
	ui8 m_red, m_green, m_blue;

	void ScrollBarProc(Scrollbar<ShaderUI>*, ui32);
	void CheckboxProc(Checkbox<ShaderUI>* pCheck, ui32);
public:
	ShaderUI();
	void Show()
	{
		m_dialog->m_visible = true;
	}
	void Hide()
	{
		m_dialog->m_visible = false;
	}

	ui8 GetRed() { return m_red; }
	ui8 GetBlue() { return m_blue; }
	ui8 GetGreen() { return m_green; }

	bool IsShadingEnabled() { return m_pShader->m_state > 0; }
	void DisableShading() { /*m_pShader->m_state = 0;*/ }
};

#define sShader (*ShaderUI::GetInstance())